export default {
  getTableConfig: ({ handelView }) => {

    return [
      {
        title: '酒款图片',
        key: 'wineLabelUrl',
        dataIndex: 'wineLabelUrl',
        render: (record) => {
          if (record) {
            return <div style={{ textAlign: 'center' }}>
              <img src={record} style={{ maxWidth: 80, maxHeight: 90, display: "inline-block" }} alt="img" />
            </div>
          }
        }
      },
      {
        title: '酒款名称',
        key: 'wineName',
        // dataIndex: 'exhibitorName',
        render: (record) => {
          return <div style={{ display: 'flex', flexDirection: 'column' }}>
            {record && record.nameCn && <span>{record.nameCn}</span>}
            {record && record.nameEn && <span>{record.nameEn}</span>}
          </div>
        }
      },
      {
        title: '展商名称',
        key: 'exhibitor',
        dataIndex: 'exhibitor',
        render: (record) => {
          return <div style={{ display: 'flex', flexDirection: 'column' }}>
            {record && record.nameCn && <span>{record.nameCn}</span>}
            {record && record.nameEn && <span>{record.nameEn}</span>}
          </div>
        }
      },

      // {
      //   title: '联系人',
      //   key: 'name',
      //   render: (record) => {
      //     return <div style={{ display: 'flex', flexDirection: "column" }}>
      //       {record && record.nameZh && <span>{record.nameZh}</span>}
      //       {record && record.nameEn && <span>{record.nameEn}</span>}
      //     </div>
      //   }
      // },
      {
        title: '操作',
        key: 'operating',
        render: (record) => {
          return <div>
            <a onClick={() => { handelView(record.id) }}>查看详情</a>
            {/* <a style={{ marginLeft: 20 }}>账户信息</a> */}
          </div>
        }
      }
    ]
  }
}